package com.byit.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.byit.domain.SysRoleMeun;
import com.byit.mapper.SysRoleMeunMapper;
import com.byit.service.ISysRoleMeunService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 角色权限表 服务实现类
 * </p>
 *
 * @author wangx
 * @since 2018-12-11
 */
@Service
public class SysRoleMeunServiceImpl extends ServiceImpl<SysRoleMeunMapper, SysRoleMeun> implements ISysRoleMeunService {

    @Autowired
    private SysRoleMeunMapper roleMeunMapper;

    @Override
    public List<String> getAuthUserMenu(Long userId) {
        return roleMeunMapper.getAuthUserMenu(userId);
    }

    @Override
    public List<JSONObject> getMenuRoleList(Long userId) {
        return roleMeunMapper.getMenuRoleList(userId);
    }

    @Override
    public List<JSONObject> selectByRoleId(Map<String, Object> map) {
        return this.baseMapper.selectByRoleId(map);
    }
}
